package leecode

func prefixCount(words []string, pref string) int {
	var result int
	for i := 0; i < len(words); i++ {
		str := words[i]
		if len(pref) > len(str) {
			continue
		}
		if str[:len(pref)] == pref {
			result++
		}
	}
	return result
}
